home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene Storm
/
Scene Storm - Volume 1.iso
/
coding
/
asm
/
demos
/
exsyslib
/
examples
/
example5.s
< prev
Wrap
Text File
|
1980-01-03
|
3KB
|
166 lines
incdir 'work:exsyslib/'
include 'include/hardware/exsys_takeover.s' ;1st codeline!
move.l #temp,d0 set up screen
move.w d0,pl1l
swap d0
move.w d0,pl1h
move.l #temp,d0
move.w d0,pl3l
swap d0
move.w d0,pl3h
move.l #screen+44*8,d0
move.l d0,pos
move.w d0,pl2l
swap d0
move.w d0,pl2h
move.l #screen+$4160,d0
move.w d0,pl4l
swap d0
move.w d0,pl4h
bsr fillmem
lea copperlist(pc),a0
bsr.w newcopper
WaitVBL: cmp.b #255,$dff006
bne.s WaitVBL
bsr scrol
btst #6,$bfe001.l ; test left mouse button
bne.s WaitVBL
rts
fillmem lea screen,a0
lea screen+$4000,a1
lea gfxdata1,a3
lea gfxdata2,a4
lea $dff000,a5
move.l #$ffffffff,$044(a5)
move.w #$0000,$064(a5)
move.w #$002a,$066(a5)
move.w #$0000,$042(a5)
move.w #$09f0,$040(a5)
moveq #19-1,d2 ;19 rows down...
fill2 moveq #22-1,d0 ;22 blocks across
fill move.l a0,$054(a5) ;dest
move.l a4,$050(a5)
move.w #$3c1,$058(a5) ;bpl 1
bsr.s blitready
move.l a1,$054(a5) ;dest
move.l a3,$050(a5)
move.w #$3c1,$058(a5) ;bpl 2
bsr.s blitready
addq.l #2,a0
addq.l #2,a1
dbra d0,fill
lea 15*44(a0),a0
lea 15*44(a1),a1
dbra d2,fill2
rts
blitready btst #14,$002(a5)
bne.s blitready
rts
newcopper: lea $dff000,a6 ;a6=custom hardware
move.w #$7fff,$96(a6) ;no dma
move.l a0,$80(a6) ;install new copperlist ptr
clr.w $88(a6) ;strobe copper
move.w #$83c0,$96(a6) ;enable copper dma
rts
pos dc.l 0
scrol move.l pos,d0
move.w d0,pl2l
swap d0
move.w d0,pl2h
swap d0
add.l #$4000,d0
move.w d0,pl4l
swap d0
move.w d0,pl4h
add.l #44,pos
cmp.l #screen+$160+$2c0,pos
bge.s reset
rts
reset: move.l #screen+$160,pos
rts
copperlist dc $008e,$1a64
dc $0090,$39d1
dc $0092,$0033
dc $0094,$00cc
dc $0100,$4400,$1fc,0,$10c,0
dc $0102,$0000
dc $0108,$0002
dc $010a,$0002 bpl1/2mod
sp_ptr dc $0120,$0000,$0122,$0000,$0124,$0000,$0126,$0000
dc $0128,$0000,$012a,$0000,$012c,$0000,$012e,$0000 ;no jib
dc $0130,$0000,$0132,$0000,$0134,$0000,$0136,$0000
dc $0138,$0000,$013a,$0000,$013c,$0000,$013e,$0000
dc $01a0,$0000,$01a2,$0333,$01a4,$0ddd,$01a6,$0fff
dc $01aa,$0333,$01ac,$0ddd,$01ae,$0fff
dc $0180,$0000,$0182,$0fff,$0184,$0333,$0186,$0fff
dc $0188,$0999,$018a,$0777,$018c,$0555,$018e,$0333
dc $0190,$0000,$0192,$0444,$0194,$0888,$0196,$0666
dc $0198,$0999,$019a,$0777,$019c,$0555,$019e,$0333
dc $00e0 set up copper bplane pointers
pl1h dc $0000
dc $00e2
pl1l dc $0000
dc $00e8
pl3h dc $0000
dc $00ea
pl3l dc $0000
dc $00e4
pl2h dc $0000
dc $00e6
pl2l dc $0000
dc $00ec
pl4h dc $0000
dc $00ee
pl4l dc $0000
dc.l -2
gfxdata1 dc %1111111111111100
dc %1111111111111100
dc %1100000000001100
dc %1101111111111100
dc %1101111111111100
dc %1101111111011100
dc %1101110011011100
dc %1101110111011100
dc %1101111111011100
dc %1101111111011100
dc %1101100000011100
dc %1101111111111100
dc %1111111111111100
dc %1111111111111100
dc %0000000000000000
gfxdata2 dc %0000000000000010
dc %0111111111111110
dc %0111111111110110
dc %0111111111110110
dc %0111000000010110
dc %0111011111110110
dc %0111011101110110
dc %0111011101110110
dc %0111010001110110
dc %0111011111110110
dc %0111011111110110
dc %0111111111110110
dc %0100000000000110
dc %0111111111111110
dc %1111111111111110
screen: ds.b 40960*4
temp ds.b 44*280